import { instance } from '@/utils/request';

const collection = (data: { gid: number }): Promise<ResponseApiDto> => {
  return instance.post(`/Collections/Collection`, data);
};

const cancelCollection = (id: number): Promise<ResponseApiDto> => {
  return instance.post(`/Collections/CancelCollection`, { id });
};

const getCollectionPagination = (page: number, limit: number): Promise<ResponseApiDto> => {
  return instance.get(`/Collections/Pagination`, { page, limit });
};

export default { collection, cancelCollection, getCollectionPagination }; // 导出 defaul
